<!DOCTYPE html>
<html lang=zh-CN>
    <head>
        <meta charset=utf-8>
        <title>去哪吃啊</title>
        <script type=text/javascript src=random.js></script>
        <style type=text/css>
            a {
                background-color: green;
                padding: 10px 20px;
                border-radius: 5px;
                color: white;
                text-decoration: none;
            }
            div {
                width: 300px;
                font-size: 36px;
                background-color: blue;
                margin-bottom: 20px;
                color: white;
                font-weight: bold;
            }
        </style>
	</head>
    <body>
        <div>去哪吃啊</div>
        <a href="#" id="start">开始选地方</a>
        <a href="#" id="stop">走</a>
        <script type=text/javascript>
            var range = ['大商','地下','百年城','泡面'];
            var div = document.getElementsByTagName('div')[0];
            function c(res) {
    div.innerHTML = res;
}
        var ran = new Random(range ,25, c)
document.getElementById('start').onclick = function () {
    ran.start();
}
document.getElementById('stop').onclick = function () {
    ran.stop();
}

    </script>
	</body>
</html>

